package design.patterns.commandmodel.simpledemo;

import design.patterns.commandmodel.audioplayerdemo.AudioPlayer;

/**
 * @Desc:   具体命令类
 * @author: cww
 * @DateTime: 2020-06-13 11:00
 */

public class RewindCommand implements Command {
    private AudioPlayer myAudio;

    public RewindCommand(AudioPlayer myAudio) {
        this.myAudio = myAudio;
    }

    @Override
    public void execute() {
        myAudio.rewind();
    }
}
